#include <iostream>
using namespace std;
#include <string>

// 日期类，用于表示出生日期
class Date {
public:
    Date(int year = 1900, int month = 1, int day = 1) : year_(year), month_(month), day_(day) {}
    void display() const {
      cout << year_ << "-" << month_ << "-" << day_;
    }

private:
    int year_;
    int month_;
    int day_;
};

// 人员类，包含编号、性别、出生日期和身份证号等属性
class Person
 {
public:
    // 构造函数，带默认形参值
    Person(const string id = "", const string gender = "", const Date birth_date = Date(), const string id_number = "")
        : id_(id), gender_(gender), birth_date_(birth_date), id_number_(id_number) {}

    // 复制构造函数
    Person(const Person &other)
        : id_(other.id_), gender_(other.gender_), birth_date_(other.birth_date_), id_number_(other.id_number_) {}

    // 析构函数
    ~Person() {}

    // 设置人员信息的成员函数
    void setInfo(const string id, const  string gender, const Date birth_date, const string id_number)
	{
        id_ = id;
        gender_ = gender;
        birth_date_ = birth_date;
        id_number_ = id_number;
    }

    // 显示人员信息的成员函数
    void displayInfo() const
	{
        cout << "ID: " << id_ <<endl;
       cout << "Gender: " << gender_ <<endl;
        cout << "Birth Date: ";
        birth_date_.display();
       cout << endl;
        cout << "ID Number: " << id_number_ <<endl;
    }

private:
    string id_;          // 编号
    string gender_;      // 性别
    Date birth_date_;         // 出生日期，内嵌子对象
    string id_number_;   // 身份证号
};

int main() {
    // 创建一个人员对象并设置信息
    Person person;
    person.setInfo("30", "curry", Date(1974, 2, 29), "51458796545648648");

    // 显示人员信息
    person.displayInfo();

    return 0;
}